package com.currency.mall.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.currency.mall.R;
import com.currency.mall.entity.BankCardBean;
import com.currency.mall.entity.WalletBean;

import org.w3c.dom.Text;

import java.util.List;

/**
 * Created by Administrator on 2018/12/5.
 */

public class BankCardAdapter extends BaseQuickAdapter<BankCardBean.BankCardInfo, BaseViewHolder> {

    public BankCardAdapter(@Nullable List<BankCardBean.BankCardInfo> data, Context context) {
        super(R.layout.item_bank_card, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BankCardBean.BankCardInfo bankCardInfo) {
        helper.setText(R.id.tv_bank_name,bankCardInfo.getCardBank());
//        helper.setText(R.id.tv_bank_card_type,bankCardInfo.getkName());
        TextView tvCardNum = helper.getView(R.id.tv_bank_card_num);
        tvCardNum.setText("****  ****  ****  " +bankCardInfo.getCardId().substring(bankCardInfo.getCardId().length()-4,bankCardInfo.getCardId().length()));
    }

}
